import java.io.*;
import java.util.Scanner;

// 注意类名必须为 Main, 不要有任何 package xxx 信息
public class test5 {
    public static PrintWriter out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int[][] arr = new int[n][n];
        for(int i = 0; i < n; i++) {
            for(int j = 0; j <= i; j++) {
                if(j == 0 || j == i) {
                    arr[i][j] = 1;
                    out.printf("%5d" + 1);
                } else {
                    arr[i][j] = arr[i-1][j-1] + arr[i-1][j];
                    out.printf("%5d",arr[i][j]);
                }
            }
            out.println();
        }
        out.close();
    }
}